#include <iostream>
using namespace std;

static long long ceil_div(int x, int y)
{
	return x/y + !!(x%y);
}

int main()
{
	int n, m, a;
	cin >> n >> m >> a;
	cout << ceil_div(n, a) * ceil_div(m, a) << endl; 
}

